﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="backstage_goods_batch_add" Codebehind="goods_batch_add.aspx.cs" %>



<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>批量添加</title>
    <link href="css/skin.css" rel="stylesheet" type="text/css" />
    <link href="/jquery.uploadify-v2.1.0/example/css/default.css" rel="stylesheet" type="text/css" />
    <link href="/jquery.uploadify-v2.1.0/uploadify.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript" src="js/main.js"></script>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>

<script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"
    charset="utf-8"></script>

<script type="text/javascript" src="/jquery.uploadify-v2.1.0/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="/jquery.uploadify-v2.1.0/swfobject.js"></script>

<script type="text/javascript" src="/jquery.uploadify-v2.1.0/jquery.uploadify.v2.1.0.min.js"></script>

<script type="text/javascript">
    var cid = "";
    var isOrderFromFreight = 0;
    var isDiscount = 0;
    var isTotalReduce = 0;
    var isGifts = 0;
    var isSendIntegral = 0;
    var fckGoodsRemark = "";
    //    var barCode="";
    //    var goodsArtno="";
    var salePrice = "";
    var costPrice = "";
    var marketPrice = "";
    var giveIntegral = "";
    var goodsWeight = "";
    var weightUnit = "";
    var inventory = "";
    var specificationsValue = "";
    $(document).ready(function () {
        $("#uploadify").uploadify({
            'uploader': '/jquery.uploadify-v2.1.0/uploadify.swf',
            'script': 'goods_batch_add.ashx',
            'cancelImg': '/jquery.uploadify-v2.1.0/cancel.png',
            'folder': '/cn/goods/big',
            'queueID': 'fileQueue',
            'queueSizeLimit': 20,
            'auto': false,
            'multi': true,
            'fileDesc': '*.jpeg;*.jpg;*.gif;*.png;*.bmp',
            'fileExt': '*.jpeg;*.jpg;*.gif;*.png;*.bmp',
            'buttonText': '浏  览',
            'method': 'GET',
            //            'scriptData':{'cid':cid,'bid':$('#selectBrand').val(),'isBest':$('input[name="isBest"]:checked').val(),'isNew':$('input[name="isNew"]:checked').val(),'isTopSelling':$('input[name="isTopSelling"]:checked').val(),'isShelves':$('input[name="isShelves"]:checked').val(),'isPromote':$('input[name="isPromote"]:checked').val(),'isUserDiscount':$('input[name="isUserDiscount"]:checked').val(),'isOrderFromFreight':isOrderFromFreight,'isDiscount':isDiscount,'isTotalReduce':isTotalReduce,'isGifts':isGifts,'isSendIntegral':isSendIntegral,'isFromFreight':$('input[name="isFromFreight"]:checked').val(),'tid':$('#selectFreightTemplate').val(),'gr':fckGoodsRemark,'kw':$('#txtKeywords').val(),'description':$('#txtaDescription').val(),'barCode':barCode,'goodsArtno':goodsArtno,'salePrice':salePrice,'costPrice':costPrice,'marketPrice':marketPrice,'giveIntegral':giveIntegral,'goodsWeight':goodsWeight,'weightUnit':weightUnit,'inventory':inventory,'specificationsValue':specificationsValue,'language_version':$('#hdLanguageVersion').val()},
            'scriptData': { 'cid': cid, 'bid': $('#selectBrand').val(), 'isBest': $('input[name="isBest"]:checked').val(), 'isNew': $('input[name="isNew"]:checked').val(), 'isTopSelling': $('input[name="isTopSelling"]:checked').val(), 'isShelves': $('input[name="isShelves"]:checked').val(), 'isPromote': $('input[name="isPromote"]:checked').val(), 'isUserDiscount': $('input[name="isUserDiscount"]:checked').val(), 'isOrderFromFreight': isOrderFromFreight, 'isDiscount': isDiscount, 'isTotalReduce': isTotalReduce, 'isGifts': isGifts, 'isSendIntegral': isSendIntegral, 'isFromFreight': $('input[name="isFromFreight"]:checked').val(), 'tid': $('#selectFreightTemplate').val(), 'gr': fckGoodsRemark, 'kw': $('#txtKeywords').val(), 'description': $('#txtaDescription').val(), 'salePrice': salePrice, 'costPrice': costPrice, 'marketPrice': marketPrice, 'giveIntegral': giveIntegral, 'goodsWeight': goodsWeight, 'weightUnit': weightUnit, 'inventory': inventory, 'specificationsValue': specificationsValue, 'language_version': $('#hdLanguageVersion').val() },
            'onAllComplete': function (evt, data) {
                alert("上传完毕！");
                window.location.href = "goods_list.aspx";
            }
        });
    });
    function batchAdd() {
        var creategory = document.getElementById("selectAddCategory");
        if (creategory.options.length == 0) {
            alert("请至少选择一个商品分类！");
            secBoardBatch(1);
            document.getElementById("selectAddCategory").focus();
            return false;
        }
        var brand = document.getElementById("selectBrand");
        if (brand.options[brand.selectedIndex].value == "0") {
            alert("请选择商品品牌！");
            secBoardBatch(1);
            brand.focus();
            return false;
        }
        if ($("#cbIsOrderFromFreight").attr("checked") == true)
            isOrderFromFreight = 1;
        if ($("#cbIsDiscount").attr("checked") == true)
            isDiscount = 1;
        if ($("#cbIsTotalReduce").attr("checked") == true)
            isTotalReduce = 1;
        if ($("#cbIsGifts").attr("checked") == true)
            isGifts = 1;
        if ($("#cbIsSendIntegral").attr("checked") == true)
            isSendIntegral = 1;
        var item = $("input[name='isFromFreight']:checked").val();
        if (item == "0") {
            if ($("#selectFreightTemplate").val() == "0") {
                $("#selectFreightTemplate").select();
                secBoardBatch(1);
                alert("请选择运费模版！");
                return false;
            }
        }
        //        var geId=document.getElementsByName("hdGoodsEntitys");
        //        ///验证条形码
        //        var barCode=document.getElementsByName("barCode");
        //        for(var n=0;n<barCode.length;n++)
        //        {
        //            if(barCode(n).value=="")
        //            {
        //                alert("请输入条形码！");
        //                secBoardBatch(3);
        //                barCode(n).focus();
        //                return false;
        //            }
        //            if(Gift.WebApp.Goods_ajax.CheckBarCode(barCode(n).value,geId(n).value).value)
        //            {
        //                alert("条形码已存在，请重新输入！");
        //                secBoardBatch(3);
        //                barCode(n).select();
        //                return false;
        //            }
        //            if(barCode.length>1)
        //            {
        //                for(var a=n+1;a<barCode.length;a++)
        //                {
        //                    if(barCode(n).value==barCode(a).value)
        //                    {
        //                        alert("条形码已存在，请重新输入！");
        //                        secBoardBatch(3);
        //                        barCode(a).select();
        //                        return false;
        //                    }
        //                }
        //            }
        //        }
        //        ///验证商品货号
        //        var goodsArtno=document.getElementsByName("goodsArtno");
        //        for(var n=0;n<goodsArtno.length;n++)
        //        {
        //            if(goodsArtno(n).value=="")
        //            {
        //                alert("请输入商品货号！");
        //                secBoardBatch(3);
        //                goodsArtno(n).focus();
        //                return false;
        //            }
        //            if(Gift.WebApp.Goods_ajax.CheckGoodsArtno(goodsArtno(n).value,geId(n).value).value)
        //            {
        //                alert("商品货号已存在，请重新输入！");
        //                secBoardBatch(3);
        //                goodsArtno(n).select();
        //                return false;
        //            }
        //            if(goodsArtno.length>1)
        //            {
        //                for(var a=n+1;a<goodsArtno.length;a++)
        //                {
        //                    if(goodsArtno(n).value==goodsArtno(a).value)
        //                    {
        //                        alert("商品货号已存在，请重新输入！");
        //                        secBoardBatch(3);
        //                        goodsArtno(a).select();
        //                        return false;
        //                    }
        //                }
        //            }
        //        }
        ///验证销售价格
        var salePrice = document.getElementsByName("salePrice");
        for (var sp = 0; sp < salePrice.length; sp++) {
            if (salePrice(sp).value == "") {
                alert("请输入销售价！");
                secBoardBatch(3);
                salePrice(sp).focus();
                return false;
            }
        }
        //验证成本价格
        var costPrice = document.getElementsByName("costPrice");
        for (var cp = 0; cp < costPrice.length; cp++) {
            if (costPrice(cp).value == "") {
                alert("请输入成本价！");
                secBoardBatch(3);
                costPrice(cp).focus();
                return false;
            }
        }
        //验证市场价格
        var marketPrice = document.getElementsByName("marketPrice");
        for (var mp = 0; mp < marketPrice.length; mp++) {
            if (marketPrice(mp).value == "") {
                alert("请输入市场价！");
                secBoardBatch(3);
                marketPrice(mp).focus();
                return false;
            }
        }
        //验证兑换积分

        if ($("input[name='isIntegral']:checked").val() == "1") {
            var it = $("input[name='giveIntegral']");
            for (var ii = 0; ii < it.length; ii++) {
                if (it[ii].value == "") {
                    alert("请输入兑换积分！");
                    secBoardBatch(3);
                    it[ii].focus();
                    return false;
                }
            }
        }
        //验证赠送积分
        var giveIntegral = document.getElementsByName("giveIntegral");
        for (var gii = 0; gii < giveIntegral.length; gii++) {
            if (giveIntegral[gii].value == "") {
                alert("请输入赠送积分！");
                secBoardBatch(3);
                giveIntegral[gii].focus();
                return false;
            }
        }
        //验证重量
        var goodsWeight = document.getElementsByName("goodsWeight");
        for (var gwi = 0; gwi < goodsWeight.length; gwi++) {
            if (goodsWeight[gwi].value == "") {
                alert("请输入重量！");
                secBoardBatch(3);
                goodsWeight[gwi].focus();
                return false;
            }
        }
        //验证库存
        var inventory = document.getElementsByName("inventory");
        for (var iti = 0; iti < inventory.length; iti++) {
            if (inventory[iti].value == "") {
                alert("请输入库存！");
                secBoardBatch(3);
                inventory[iti].focus();
                return false;
            }
        }
        ///商品分类
        cid = "";
        for (var z = 0; z < creategory.options.length; z++) {
            creategory.options[z].selected = true;
            if (z == 0)
                cid += creategory.options[z].value;
            else
                cid += "," + creategory.options[z].value;
        }
        fckGoodsRemark = FCKeditorAPI.GetInstance("fckGoodsRemark").GetXHTML(true);
        //        ///条形码
        //        barCode="";
        //        for(var i=0;i<$('input[name=barCode]').length;i++){
        //            if(barCode==""&&i==0)
        //                barCode+=$('input[name=barCode]')[i].value;
        //            else
        //                barCode+=","+$('input[name=barCode]')[i].value;
        //        }
        //        ///商品货号
        //        goodsArtno="";
        //        for(var i=0;i<$('input[name=goodsArtno]').length;i++){
        //            if(goodsArtno==""&&i==0)
        //                goodsArtno+=$('input[name=goodsArtno]')[i].value;
        //            else
        //                goodsArtno+=","+$('input[name=goodsArtno]')[i].value;
        //        }
        ///销售价格
        salePrice = "";
        for (var i = 0; i < $('input[name=salePrice]').length; i++) {
            if (salePrice == "")
                salePrice += $('input[name=salePrice]')[i].value;
            else
                salePrice += "," + $('input[name=salePrice]')[i].value;
        }
        ///成本价格
        costPrice = "";
        for (var i = 0; i < $('input[name=costPrice]').length; i++) {
            if (costPrice == "")
                costPrice += $('input[name=costPrice]')[i].value;
            else
                costPrice += "," + $('input[name=costPrice]')[i].value;
        }
        ///市场价格
        marketPrice = "";
        for (var i = 0; i < $('input[name=marketPrice]').length; i++) {
            if (marketPrice == "")
                marketPrice += $('input[name=marketPrice]')[i].value;
            else
                marketPrice += "," + $('input[name=marketPrice]')[i].value;
        }
        ///赠送积分
        giveIntegral = "";
        for (var i = 0; i < $('input[name=giveIntegral]').length; i++) {
            if (giveIntegral == "")
                giveIntegral += $('input[name=giveIntegral]')[i].value;
            else
                giveIntegral += "," + $('input[name=giveIntegral]')[i].value;
        }
        ///重量
        goodsWeight = "";
        for (var i = 0; i < $('input[name=goodsWeight]').length; i++) {
            if (goodsWeight == "")
                goodsWeight += $('input[name=goodsWeight]')[i].value;
            else
                goodsWeight += "," + $('input[name=goodsWeight]')[i].value;
        }
        ///重量单位
        weightUnit = "";
        for (var i = 0; i < $('select[name="selectWeightUnit"] option:selected').length; i++) {
            if (weightUnit == "")
                weightUnit += $('select[name="selectWeightUnit"] option:selected')[i].value;
            else
                weightUnit += "," + $('select[name="selectWeightUnit"] option:selected')[i].value;
        }
        ///库存
        inventory = "";
        for (var i = 0; i < $('input[name=inventory]').length; i++) {
            if (inventory == "")
                inventory += $('input[name=inventory]')[i].value;
            else
                inventory += "," + $('input[name=inventory]')[i].value;
        }
        ///销售规格
        var specifications = Gift.WebApp.Goods_ajax.GetSpecificationsByLanguageVersion().value;
        specificationsValue = "";
        for (var j = 0; j < specifications.length; j++) {
            var sName = "SpecificationsValue" + specifications[j];
            if ($('select[name="' + sName + '"] option:selected').length > 0) {
                if (specificationsValue != "")
                    specificationsValue += "-" + sName + "：";
                else
                    specificationsValue += sName + "：";
                for (var i = 0; i < $('select[name="' + sName + '"] option:selected').length; i++) {
                    if (i == 0)
                        specificationsValue += $('select[name="' + sName + '"] option:selected')[i].value;
                    else
                        specificationsValue += "," + $('select[name="' + sName + '"] option:selected')[i].value;
                }
            }
        }
        $('#uploadify').uploadifySettings('scriptData', { 'cid': cid });
        $('#uploadify').uploadifySettings('scriptData', { 'bid': $('#selectBrand').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isBest': $('input[name="isBest"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isNew': $('input[name="isNew"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isTopSelling': $('input[name="isTopSelling"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isShelves': $('input[name="isShelves"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isPromote': $('input[name="isPromote"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'isUserDiscount': $('input[name="isUserDiscount"]:checked').val() });

        $('#uploadify').uploadifySettings('scriptData', { 'isOrderFromFreight': isOrderFromFreight });
        $('#uploadify').uploadifySettings('scriptData', { 'isDiscount': isDiscount });
        $('#uploadify').uploadifySettings('scriptData', { 'isTotalReduce': isTotalReduce });
        $('#uploadify').uploadifySettings('scriptData', { 'isGifts': isGifts });
        $('#uploadify').uploadifySettings('scriptData', { 'isSendIntegral': isSendIntegral });

        $('#uploadify').uploadifySettings('scriptData', { 'isFromFreight': $('input[name="isFromFreight"]:checked').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'tid': $('#selectFreightTemplate').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'gr': fckGoodsRemark });
        $('#uploadify').uploadifySettings('scriptData', { 'kw': $('#txtKeywords').val() });
        $('#uploadify').uploadifySettings('scriptData', { 'description': $('#txtaDescription').val() });

        //        $('#uploadify').uploadifySettings('scriptData',{'barCode':barCode});
        //        $('#uploadify').uploadifySettings('scriptData',{'goodsArtno':goodsArtno});
        $('#uploadify').uploadifySettings('scriptData', { 'salePrice': salePrice });
        $('#uploadify').uploadifySettings('scriptData', { 'costPrice': costPrice });
        $('#uploadify').uploadifySettings('scriptData', { 'marketPrice': marketPrice });
        $('#uploadify').uploadifySettings('scriptData', { 'giveIntegral': giveIntegral });
        $('#uploadify').uploadifySettings('scriptData', { 'goodsWeight': goodsWeight });
        $('#uploadify').uploadifySettings('scriptData', { 'weightUnit': weightUnit });
        $('#uploadify').uploadifySettings('scriptData', { 'inventory': inventory });
        $('#uploadify').uploadifySettings('scriptData', { 'specifications': specificationsValue });
        $('#uploadify').uploadifySettings('scriptData', { 'language_version': $('#hdLanguageVersion').val() });

        jQuery('#uploadify').uploadifyUpload();
    }
    function isDisplayFreightTemplate() {
        var item = $("input[name='isFromFreight']:checked").val();
        if (item == "1")
            $("#trFreightTemplate").hide();
        else
            $("#trFreightTemplate").show();
    }
    $(function () {
        var sc = document.getElementById("selectCategory");
        var sac = document.getElementById("selectAddCategory");
        $("#btnAllAdd").click(function () {
            for (var i = 0; i < sc.options.length; i++) {
                var rs = false;
                for (var j = 0; j < sac.options.length; j++) {
                    if (sac.options[j].value == sc.options[i].value)
                        rs = true;
                }
                if (!rs) {
                    var selectItem = new Option();
                    if (sc.options[i].text.indexOf("┣") != -1)
                        selectItem.text = sc.options[i].text.substring(sc.options[i].text.indexOf("┣") + 1);
                    else
                        selectItem.text = sc.options[i].text;
                    selectItem.value = sc.options[i].value
                    sac.options.add(selectItem);
                }
            }
            getBrands();
        });
        $("#btnAdd").click(function () {
            for (var i = 0; i < sc.options.length; i++) {
                if (sc.options[i].selected) {
                    var rs = false;
                    for (var j = 0; j < sac.options.length; j++) {
                        if (sac.options[j].value == sc.options[i].value)
                            rs = true;
                    }
                    if (!rs) {
                        var selectItem = new Option();
                        if (sc.options[i].text.indexOf("┣") != -1)
                            selectItem.text = sc.options[i].text.substring(sc.options[i].text.indexOf("┣") + 1);
                        else
                            selectItem.text = sc.options[i].text;
                        selectItem.value = sc.options[i].value
                        sac.options.add(selectItem);
                    }
                }
            }
            getBrands();

        });
        $("#btnDelete").click(function () {
            for (var i = (sac.options.length - 1); i > -1; i--) {
                if (sac.options[i].selected) {
                    sac.options.remove(i);
                }

            }
            getBrands();
        });
        $("#btnAllDelete").click(function () {
            for (var i = (sac.options.length - 1); i > -1; i--) {
                sac.options.remove(i);
            }
            getBrands();
        });
    });
    function getBrands() {
        var sac = document.getElementById("selectAddCategory");
        if (sac.options.length == 0)
            $("#goodsBrand").html("<select id=\"selectBrand\" name=\"brand\"><option value=\"0\">请选择品牌...</option></select>")
        else {
            var cid = "";
            for (var j = 0; j < sac.options.length; j++) {
                if (j == 0)
                    cid += sac.options[j].value;
                else
                    cid += "," + sac.options[j].value;
            }
            var gb = Gift.WebApp.Goods_ajax.GetBrandByCategoryIdentity(cid).value;
            $("#goodsBrand").html(gb);
        }
    }
</script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_left_top">
                <img alt="" src="images/left-top-right.gif" /></td>
            <td class="td_middle_top">
                <div class="left_topbg">
                    <div class="titlebt">
                        批量添加
                    </div>
                </div>
            </td>
            <td class="td_right_top">
                <img alt="" src="images/nav-right-bg.gif" /></td>
        </tr>
        <tr>
            <td class="td_left_middle">
            </td>
            <td class="td_middle_middle">
                <div class="maincontent">
                    <form id="form1" runat="server" enctype="multipart/form-data">
                        <!--HTML部分-->
                        <table border="0" cellpadding="0" cellspacing="0" id="secTable">
                            <tr style="text-align: center;">
                                <td id="td1" class="sec2" onclick="secBoardBatch(1);">
                                    商品基本信息</td>
                                <td id="td2" class="sec1" onclick="secBoardBatch(2);">
                                    商品展示图片</td>
                                <td id="td3" class="sec1" onclick="secBoardBatch(3);">
                                    商品销售规格</td>
                                <%--<td id="td4" class="sec1" onclick="secBoard(4);">
                                    商品详细属性</td>--%>
                            </tr>
                        </table>
                        <!--关于商品基本信息-->
                        <div id="tab1">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="td_title">
                                        商品分类：</td>
                                    <td class="td_content">
                                        <table>
                                            <tr>
                                                <td style="width: 280px;">
                                                    <select id="selectCategory" name="category" multiple="multiple" class="select">
                                                        <%Response.Write(CategoryBind()); %>
                                                    </select>
                                                </td>
                                                <td style="text-align: center; width: 120px;">
                                                    <input id="btnAllAdd" type="button" value="添加所有" title="添加所有分类" class="formButton" /><br />
                                                    <br />
                                                    <input id="btnAdd" type="button" value="添加选取" title="添加选取分类" class="formButton" /><br />
                                                    <br />
                                                    <input id="btnDelete" type="button" value="移除选取" title="移除选取分类" class="formButton" /><br />
                                                    <br />
                                                    <input id="btnAllDelete" type="button" value="移除所有" title="移除所有分类" class="formButton" />
                                                </td>
                                                <td>
                                                    <select id="selectAddCategory" name="addCategory" multiple="multiple" class="select">
                                                    </select>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        商品品牌：</td>
                                    <td class="td_content">
                                        <span id="goodsBrand">
                                            <select id="selectBrand" name="brand">
                                                <option value="0">请选择品牌...</option>
                                            </select>
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否精品推荐：</td>
                                    <td class="td_content">
                                        <input id="rdIsBest1" name="isBest" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsBest0" name="isBest" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否新品推荐：</td>
                                    <td class="td_content">
                                        <input id="rdIsNew1" name="isNew" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsNew0" name="isNew" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否热销推荐：</td>
                                    <td class="td_content">
                                        <input id="rdIsTopSelling1" name="isTopSelling" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsTopSelling0" name="isTopSelling" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否上架：</td>
                                    <td class="td_content">
                                        <input id="rdIsShelves1" name="isShelves" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsShelves0" name="isShelves" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否打折促销：</td>
                                    <td class="td_content">
                                        <input id="rdIsPromote1" name="isPromote" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsPromote0" name="isPromote" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        是否参与会员打折：</td>
                                    <td class="td_content">
                                        <input id="rdIsUserDiscount1" name="isUserDiscount" type="radio" runat="server" value="1" />是&nbsp;&nbsp;<input
                                            id="rdIsUserDiscount0" name="isUserDiscount" type="radio" runat="server" value="0" />否
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        优惠活动：</td>
                                    <td class="td_content">
                                        <input id="cbIsOrderFromFreight" name="isOrderFromFreight" type="checkbox" runat="server"/>订单满额免运费
                                        <input id="cbIsDiscount" name="isDiscount" type="checkbox" runat="server" />订单满额打折
                                        <input id="cbIsTotalReduce" name="isTotalReduce" type="checkbox" runat="server" />订单满额减少
                                        <input id="cbIsGifts" name="isGifts" type="checkbox" runat="server" />订单满额赠送礼品
                                        <input id="cbIsSendIntegral" name="isSendIntegral" type="checkbox" runat="server" />订单满额赠送积分
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        运费：</td>
                                    <td class="td_content">
                                        <input id="rdIsFromFreight1" name="isFromFreight" type="radio" runat="server" value="1"
                                            onclick="isDisplayFreightTemplate();" />卖家承担&nbsp;&nbsp;<input id="rdIsFromFreight0"
                                                name="isFromFreight" type="radio" runat="server" value="0" onclick="isDisplayFreightTemplate();" />买家承担
                                    </td>
                                </tr>
                                <tr id="trFreightTemplate">
                                    <td class="td_title">
                                        运费模版：</td>
                                    <td class="td_content">
                                        <select id="selectFreightTemplate" name="freightTemplate" onchange="setFreightTemplate();">
                                            <option value="0">请选择运费模版...</option>
                                            <%Response.Write(FreightTemplateBind()); %>
                                        </select>
                                        <span id="spFreightTemplate"></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        商品详细描述
                                    </td>
                                    <td class="td_content">
                                        <FCKeditorV2:FCKeditor ID="fckGoodsRemark" runat="server" BasePath="/fckeditor/"
                                            Height="400px">
                                        </FCKeditorV2:FCKeditor>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        页面关键词：</td>
                                    <td class="td_content">
                                        <input id="txtKeywords" type="text" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td_title">
                                        页面描述：</td>
                                    <td class="td_content">
                                        <textarea id="txtaDescription" runat="server" cols="20" rows="2"></textarea>
                                        <input id="hdLanguageVersion" type="hidden" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <!--关于商品展示图片-->
                        <div id="tab2" style="display: none;">
                            <div id="fileQueue">
                            </div>
                            <input type="file" name="uploadify" id="uploadify" />
                        </div>
                        <!--关于商品销售规格-->
                        <div id="tab3" style="display: none;">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="width: 30%;">
                                        <%Response.Write(SpecificationsBind()); %>
                                    </td>
                                    <td style="width: 70%;">
                                        <span id="Specifications"></span>
                                    </td>
                                </tr>
                            </table>
                            <table border="0" cellpadding="0" cellspacing="0" id="GoodsEntitysSpecifications">
                                <tr>
                                    <%--<td>
                                        条形码</td>
                                    <td>
                                        货号</td>--%>
                                    <td>
                                        销售价</td>
                                    <td>
                                        成本价</td>
                                    <td>
                                        市场价</td>
                                    <td>
                                        赠送积分</td>
                                    <td>
                                        重量</td>
                                    <td>
                                        重量单位</td>
                                    <td>
                                        库存</td>
                                    <td>
                                        操作</td>
                                </tr>
                                <tr>
                                    <%--<td>
                                        <input name="barCode" type="text" class="specifications" /></td>
                                    <td>
                                        <input name="hdGoodsEntitys" type="hidden" value="0" /><input name="goodsArtno" type="text" class="specifications" /></td>--%>
                                    <td>
                                        <input name="salePrice" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <input name="costPrice" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <input name="marketPrice" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <input name="giveIntegral" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <input name="goodsWeight" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <select name="selectWeightUnit">
                                            <option value="克">克 </option>
                                            <option value="千克">千克 </option>
                                            <option value="吨">吨 </option>
                                        </select>
                                    </td>
                                    <td>
                                        <input name="inventory" type="text" class="specifications" value="0" /></td>
                                    <td>
                                        <input id="btnBatchAddGoodsEntitys" type="button" class="formButton" value="添加" title="添加货品"
                                            onclick="BatchAddGoodsEntitys();" /></td>
                                </tr>
                            </table>
                        </div>
                        <input id="btnSubmit" type="button" class="formButton" value=" 确  定" onclick="batchAdd();" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <input id="btnBack" type="button" class="formButton" value=" 返  回 " onclick="location.href='goods_list.aspx';" />
                    </form>
                </div>
            </td>
            <td class="td_right_middle">
            </td>
        </tr>
        <tr>
            <td class="td_left_bottom">
                <img alt="" src="images/buttom_left2.gif" />
            </td>
            <td class="td_middle_bottom">
                <img alt="" src="images/buttom_bgs.gif" />
            </td>
            <td class="td_right_bottom">
                <img alt="" src="images/buttom_right2.gif" />
            </td>
        </tr>
    </table>
</body>
</html>
